<template>
    <!-- // LTE基础性能统计_小区(天) -->
    <index-card :indexCardTitle="indexCardTitle">
        <el-table :data="tableData" v-loading="loading">
            <el-table-column prop="starttime" label="开始时间" min-width="200">
                <template #default="scope">
                    {{ scope.row.starttime ? formatDateNormal(scope.row.starttime) : null }}
                </template>
            </el-table-column>
            <el-table-column prop="cgi" label="小区CGI" min-width="200" />
            <el-table-column prop="enbid" label="LTE基站编号" min-width="200" />
            <el-table-column prop="cityName" label="地市名称" min-width="200" />
            <el-table-column prop="areaName" label="区县名称" min-width="200" />
            <el-table-column prop="cityId" label="地市编号" min-width="200" />
            <el-table-column prop="areaId" label="区县编号" min-width="200" />
            <el-table-column prop="cellName" label="小区名称" min-width="200" />
            <el-table-column prop="cellLifecycleStatus" label="小区生命周期状态" min-width="200" />
            <el-table-column prop="ferabDropRateQ1" label="E-RAB掉线率(QCI=1)(小区级)(%)" min-width="200" />
            <el-table-column prop="ferabDropRateF2" label="E-RAB掉线率(%)" min-width="200" />
            <el-table-column prop="ferabDropRateQ1F2" label="E-RAB掉线率(QCI=1)(%)" min-width="200" />
            <el-table-column prop="fwlsDropRate" label="无线掉线率(%)" min-width="200" />
            <el-table-column prop="activeErabRel1" label="激活E-RAB释放个数(QCI=1)(次)" min-width="200" />
            <el-table-column prop="fhoSucRate" label="切换成功率(%)" min-width="200" />
            <el-table-column prop="handoutExecReqIntrafreq" label="同频切换出执行请求次数(次)" min-width="200" />
            <el-table-column prop="handoutSuccIntrafreq" label="同频切换出成功次数(次)" min-width="200" />
            <el-table-column prop="fhoSucExeRateIntraFreq" label="同频切换执行成功率(%)" min-width="200" />
            <el-table-column prop="handoutExecReqInterfreq" label="异频切换出执行请求次数(次)" min-width="200" />
            <el-table-column prop="handoutSuccInterfreq" label="异频切换出成功次数(次)" min-width="200" />
            <el-table-column prop="fhoSucExeRateInterFreq" label="异频切换执行成功率(%)" min-width="200" />
            <el-table-column prop="handoutFail" label="切换出失败次数(次)" min-width="200" />
            <el-table-column prop="handinSucc" label="切换入成功次数(次)" min-width="200" />
            <el-table-column prop="fhoSucRate1" label="VoLTE用户切换成功率(%)" min-width="200" />
            <el-table-column prop="frhoOutSucRateEsrvcc" label="eSRVCC切换成功率(%)" min-width="200" />
            <el-table-column prop="pktNbrUl1" label="小区上行包数(QCI=1)(个)" min-width="200" />
            <el-table-column prop="pktLossUl1" label="小区上行丢包数(QCI=1)(个)" min-width="200" />
            <el-table-column prop="fpdcpLosPktRateUpUl" label="小区用户面上行丢包率(百万分之一)" min-width="200" />
            <el-table-column prop="fpdcpLosPktRateUpUlQ1" label="VoLTE上行丢包率(百万分之一)" min-width="200" />
            <el-table-column prop="pktNbrDl1" label="小区下行包数(QCI=1)(个)" min-width="200" />
            <el-table-column prop="pktLossDl1" label="小区下行丢包数(QCI=1)(个)" min-width="200" />
            <el-table-column prop="fpdcpLosPktRateUpDl" label="小区用户面下行丢包率(百万分之一)" min-width="200" />
            <el-table-column prop="fpdcpLosPktRateUpDlQ1" label="VoLTE下行丢包率(百万分之一)" min-width="200" />
            <el-table-column prop="rrcConnNbrMean" label="RRC连接平均数(个)" min-width="200" />
            <el-table-column prop="rrcConnNbrMax" label="RRC连接最大数(个)" min-width="200" />
            <el-table-column prop="rrcConnEstabAtt" label="RRC连接建立请求次数(次)" min-width="200" />
            <el-table-column prop="rrcConnEstabSucc" label="RRC连接建立成功次数(次)" min-width="200" />
            <el-table-column prop="frrcSucConEstRate" label="RRC连接建立成功率(%)" min-width="200" />
            <el-table-column prop="rrcConnNbrMeanEffective" label="有效RRC连接平均数(个)" min-width="200" />
            <el-table-column prop="rrcConnNbrMaxEffective" label="有效RRC连接最大数(个)" min-width="200" />
            <el-table-column prop="erabEstabAtt" label="E-RAB建立请求数(次)" min-width="200" />
            <el-table-column prop="erabEstabAtt1" label="E-RAB建立请求数(QCI=1)(次)" min-width="200" />
            <el-table-column prop="erabEstabSucc" label="E-RAB建立成功数(次)" min-width="200" />
            <el-table-column prop="erabEstabSucc1" label="E-RAB建立成功数(QCI=1)(次)" min-width="200" />
            <el-table-column prop="ferabSucEstRate" label="E-RAB建立成功率(%)" min-width="200" />
            <el-table-column prop="ferabSucEstRateQ1" label="E-RAB建立成功率(QCI=1)(%)" min-width="200" />
            <el-table-column prop="fwlsSucCallRate" label="无线接通率(%)" min-width="200" />
            <el-table-column prop="fwlsSucCallRateQ1" label="无线接通率(QCI=1)(%)" min-width="200" />
            <el-table-column prop="rrcReestabAtt" label="RRC连接重建请求次数(次)" min-width="200" />
            <el-table-column prop="rrcReestabSucc" label="RRC连接重建成功次数(次)" min-width="200" />
            <el-table-column prop="frrcConReestRate" label="RRC连接重建比率(%)" min-width="200" />
            <el-table-column prop="fmacTbUl16qamRate" label="上行16QAM编码比例(%)" min-width="200" />
            <el-table-column prop="fmacTbUl64qamRate" label="上行64QAM编码比例(%)" min-width="200" />
            <el-table-column prop="fmacTbDlQpskRate" label="下行QPSK编码比例(%)" min-width="200" />
            <el-table-column prop="fmacTbDl16qamRate" label="下行16QAM编码比例(%)" min-width="200" />
            <el-table-column prop="fmacTbDl64qamRate" label="下行64QAM编码比例(%)" min-width="200" />
            <el-table-column prop="fmacInitbHarqRateUlF2" label="上行HARQ重传比率(%)" min-width="200" />
            <el-table-column prop="fmacInitbHarqRateDlF2" label="下行HARQ重传比率(%)" min-width="200" />
            <el-table-column prop="fmacTbDlRank2Rate" label="下行双流占比(%)" min-width="200" />
            <el-table-column prop="kbyteUplaneUl" label="空口上行业务字节数(KB)" min-width="200" />
            <el-table-column prop="kbyteUplaneDl" label="空口下行业务字节数(KB)" min-width="200" />
            <el-table-column prop="mbyteUplaneUl" label="上行流量(MB)(MB)" min-width="200" />
            <el-table-column prop="mbyteUplaneDl" label="下行流量(MB)(MB)" min-width="200" />
            <el-table-column prop="mbyteUplaneSum" label="总流量(MB)(MB)" min-width="200" />
            <el-table-column prop="fpdcpOctQ2" label="VoLTE视频总流量(KB)" min-width="200" />
            <el-table-column prop="fpdcpOctQ1" label="VoLTE语音总流量(KB)" min-width="200" />
            <el-table-column prop="fpdcpOctUp" label="空口业务总字节数(个)" min-width="200" />
            <el-table-column prop="ierabActiveMeanQ2" label="VoLTE视频话务量(erl)" min-width="200" />
            <el-table-column prop="ierabActiveMeanQ1" label="VoLTE语音话务量(erl)" min-width="200" />
            <el-table-column prop="intervalUlPdcp" label="小区PDCP层接收上行数据的业务总时长(ms)" min-width="200" />
            <el-table-column prop="kbyteUplaneUlLast" label="小区用户面上行尾包字节(KB)" min-width="200" />
            <el-table-column prop="frruRatioUl" label="上行用户平均速率(Mbps)" min-width="200" />
            <el-table-column prop="intervalDlPdcp" label="小区PDCP层发送下行数据的业务总时长(ms)" min-width="200" />
            <el-table-column prop="kbyteUplaneDlLast" label="小区用户面下行尾包字节数(KB)" min-width="200" />
            <el-table-column prop="frruRatioDl" label="下行用户平均速率(Mbps)" min-width="200" />
            <el-table-column prop="nbrCqi0" label="值为0的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi1" label="值为1的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi2" label="值为2的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi3" label="值为3的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi4" label="值为4的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi5" label="值为5的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi6" label="值为6的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi7" label="值为7的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi8" label="值为8的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi9" label="值为9的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi10" label="值为10的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi11" label="值为11的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi12" label="值为12的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi13" label="值为13的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi14" label="值为14的CQI数(个)" min-width="200" />
            <el-table-column prop="nbrCqi15" label="值为15的CQI数(个)" min-width="200" />
            <el-table-column prop="cqiLt7Rate" label="CQI<7占比(%)" min-width="200" />
            <el-table-column prop="fpdcpDiscPktRateUpDl" label="小区用户面下行弃包率(百万分之一)" min-width="200" />
            <el-table-column prop="fpdcpDiscPktRateUpDlQ1" label="VoLTE下行弃包率(百万分之一)" min-width="200" />
        </el-table>
    </index-card>
</template>

<script setup>
import { ref } from "vue";
import { apiCommon, formatDateNormal } from "@/utils/index.js";
import * as qualityApi from "@/api/biz/networkQuality";
import mittBus from "@/utils/mittBus"; // mitt事件总线

mittBus.on("get4GIndexItemData", (params) => {
    getData(params)
});

const props = defineProps({
    indexCardTitle: {
        type: String,
        default: '',
    },
    rowsData: {
        type: Object,
        default: () => { },
    },
});

const tableData = ref([]);
let loading = ref(false);

const getData = async (params) => {
    // console.log('params', params)

    loading.value = true;
    tableData.value = await apiCommon(qualityApi.getLteCapabilityDailyList, params);
    tableData.value = tableData.value.data;
    loading.value = false;
}

getData(props.rowsData);
</script>